<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>资讯管理</title>
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="stylesheet" href="css/admin/newsMangent.css" />
</head>
<body>
	<%@include file="../common/header.jsp"%>
	<%@include file="../common/mainLeft.jsp"%>
	<div class="pageIndex">
		<header class="headerInder">
			<span style="padding-left: 20px;">位置：首页 > 资讯管理</span>
		</header>
		<div>
			<table class="table">
				<thead class="tableHeader">
					<th style="width: 80px;">序号</th>
					<th style="width: 80px;">分类</th>
					<th style="width: 420px;">标题</th>
					<th style="width: 180px; overflow: hidden;">最近编辑时间</th>
					<th style="width: 80px;">操作</th>
				</thead>
				<tbody>
					<c:forEach items="${newsList}" var="news" varStatus="ind">
						<tr class="trBox">
							<td class="tr">${ind.index+1}</td>
							<td class="tr">
								<c:if test="${news.classify==1}">公司新闻</c:if>
								<c:if test="${news.classify==2}">行业动态</c:if>
								<c:if test="${news.classify==3}">最新政策</c:if>
							</td>
							<td style="width: 140px; overflow: hidden;">${news.title}</td>
							<td class="tr">${news.updateTime}</td>
							<td class="tr">
								<span class="deleteSpan" id="${news.id}" style="cursor: pointer;color: blue;" >删除</span>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div style="float: right; padding: 20px;"><%@ include file="../common/page.jsp"%></div>
		</div>
	</div>
	<script type="text/javascript">
		var deleteSpans = $('.deleteSpan');
		$.each(deleteSpans,function(index) {
			$(this).click(function() {
				var con = confirm('你确定要删除吗')
				if(con) {
					window.location.href='deleteNews.htm?id='+$(this).attr('id');
				}
			})
		})
	</script>
	<script type="text/javascript" src="js/jquery.pagination.js"></script>
</body>
</html>
